/**
 * Created by Freeman on 2016/6/29.
 */

import Vuex from 'vuex'
import Vue from 'vue'

import showmsg from './modules/showmsg'
import globalVal from './modules/global.val'
import auth from './modules/auth'
import tagList from './modules/tag.list'
import articleList from './modules/article.list'
import articleDetail from './modules/article.detail'
import articleWrite from './modules/article.write'
import options from './modules/options'
import commentList from './modules/comment.list'
import searchList from './modules/search.list'


import middlewares from './middlewares'


const debug = process.env.NODE_ENV !== 'production'
Vue.use(Vuex)
Vue.config.debug = debug
Vue.config.warnExpressionErrors = false

export default new Vuex.Store({
    modules: {
        showmsg,
        globalVal,
        auth,
        tagList,
        articleList,
        options,
        articleDetail,
        commentList,
        articleWrite,
        searchList,
    },
    strict: debug,
    middlewares
})